const Generator = require('yeoman-generator')

// const buf = Buffer.alloc(100)
module.exports = class extends Generator{
    prompting(){
        return this.prompt([{
            type:'input',
            name:"name",
            message:'your ProjectName',
            default:this.appname
        }]).then(anwsers=>{
            this.anwsers = anwsers
        })
    }
    writing(){
        const tmpl = this.templatePath('bar.html')
        const output = this.destinationPath('index.html')
        const context = this.anwsers
        this.fs.copyTpl(tmpl,output,context)
    }
}